import Route from 'react-router/lib/Route';
import { getEcCom } from './util/convert';
const { WeaLocaleProvider } = getEcCom();
import Home from './components/Home';
import Req from './components/main/AsyncLoad';
import ReqNoRight from './components/main/ReqNoRight';
import ReqWffileUpload from './components/main/ReqWffileUpload';
import PrintReq from './components/print/AsyncLoad';
import Analyze from './components/analyze/AnalyzeAsync';
import SmartWfGuess from './components/smartGuessMap/SmartGuessPic';
import ContinuationProcess from './components/continuationProcess/ContinuationProcess';
import stores from './stores/index';
import base from './util/base';
base.init(stores);
import './util/index';

require("./pcInterface");

const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'workflowForm');

const WorkflowFormRoute = (
  <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@t2zh74`} breadcrumbName="流程表单" path="workflow" onEnter={getLocaleLabel} component={Home}>
  	<Route ecId={`${this && this.props && this.props.ecId || ''}_Route@vmt0lk`} breadcrumbName="流程表单详情" path="req" component={Req} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@4puh9a`} breadcrumbName="表单无权限" path="reqNoRight" component={ReqNoRight} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@zf1bp2`} breadcrumbName="打印表单" path="printReq" component={PrintReq} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@vtxpfv`} breadcrumbName="智能分析" path="analyze" component={Analyze} />
    {/* 智能预测图单页url中要有requestid值和isFromMobile=1才能访问 */}
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@w84bkx`} breadcrumbName="流程图智能预测" path="smartGuess" component={SmartWfGuess}/> 
    <Route breadcrumbName="流程连续处理" path="ContinuationProcess" component={ContinuationProcess} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@w84bkx`} breadcrumbName="公文附件" path="wffileupload" component={ReqWffileUpload}/>
</Route>
)

module.exports = {
  Route: WorkflowFormRoute,
  store: stores
}

/***** window方法与store通信统一规范 *****/
const doWorkflowFormAction = {
  
}

window.doWorkflowFormAction = doWorkflowFormAction;
